from selenium import webdriver
import time
driver = webdriver.Chrome()
url = 'https://whu.metaersp.cn/databaseDetail?databaseNum=DB_a377984553fc42348fb30501eead70f7'
driver.get(url)
driver.implicitly_wait(3)
driver.find_element_by_class_name('loginBtn').click()
driver.find_element_by_id('username').send_keys('2019202100054')
driver.find_element_by_id('password').send_keys('153322')
driver.find_element_by_class_name('iCheck-helper').click()
driver.find_element_by_class_name('auth_login_btn').click()
time.sleep(9)
driver.find_element_by_class_name('siteLink').click()
#切换窗口
for handle in driver.window_handles:
    driver.switch_to.window(handle)
    if 'WiseSearch' in driver.title:
        break
time.sleep(4)
driver.find_element_by_xpath("/html/body/div[1]/div/div[2]/div/div/div[5]/div/div/div[1]/button/span").click()
time.sleep(4)
driver.find_element_by_class_name('toggle-collapse').click()
driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div/div[3]/div/div/div/div[2]/div[1]/div/div[1]/div[2]/div/div[3]/div[1]/div/div[1]/div/label/div/i[1]').click()
driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div/div[3]/div/div/div/div[2]/div[1]/div/div[1]/div[2]/div/div[3]/div[1]/div/div[2]/div[1]/div/label/div/span').click()
driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div/div[3]/div/div/div/div[2]/div[1]/div/div[1]/div[2]/div/div[3]/div[2]/div/div[1]/div/label/div/span').click()
driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div/div[3]/div/div/div/div[2]/div[1]/div/div[1]/div[2]/div/div[3]/div[2]/div/div[2]/div[1]/div/label/div/span').click()
driver.find_element_by_xpath('/html/body/div[1]/div/div[2]/div/div/div[3]/div/div/div/div[2]/div[1]/div/div[1]/div[2]/div/div[3]/div[3]/div/div[1]/div/label/div/span').click()

time.sleep(100)

for i in driver.find_elements_by_class_name('pull-right'):
    print(i.text)